# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=xchm
pkgver=1.36
pkgrel=1
pkgdesc='Viewer for CHM files (GUI front-end to chmlib)'
arch=('loong64' 'x86_64')
url='https://github.com/rzvncj/xCHM'
license=('GPL2')
depends=('chmlib' 'wxwidgets-gtk3')
source=("https://github.com/rzvncj/xCHM/releases/download/$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('291411f51fe702f7f60a2904757183cfb7b7a0852e008bd71dcbfbe573ea9f43')

prepare() {
  cd $pkgname-$pkgver
  autoreconf -fi
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
